package cn.lg.soar.system.biz.modules.tenant.entity;

import cn.lg.soar.database.base.entity.IBaseEntity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * 租户
 * @author luguoxiang
 * @since 2022-04-30
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@Getter
@Setter
@Accessors(chain = true)
@Schema(description = "授予租户的菜单")
@TableName("lg_sys_tenant_grant_menu")
public class TenantGrantMenu {

    private static final long serialVersionUID=1L;

    @TableId(type = IdType.NONE)
    @Schema(description = "租户id")
    private Integer tntId;

    @Schema(description = "菜单id")
    private Long menuId;

    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    @Schema(description = "创建时间")
    @TableField(value = IBaseEntity.CREATE_TIME, fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NEVER)
    protected LocalDateTime createTime;

    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    @TableField(value = IBaseEntity.CREATE_BY, fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NEVER)
    @Schema(description = "创建人")
    protected Long createBy;

}
